#include <iostream>

class A {
private:
    int m_x, m_y;
public:
    A() {
        m_x = 100;
        m_y = 200;
        std::cout << "constructor" << std::endl;
    }
    explicit A(int x) {
        m_x = x;
        m_y = 0;
        std::cout << "one parameter constructor" << std::endl;
    }
    void outPut() {
        std::cout << "x = " << m_x << ", " << "y = " << m_y << std::endl;
    }
    ~A() {
        std::cout << "destructor" << std::endl;
    }
};

int main() {
    A a{10};
    a.outPut();
    A b(20.2); //()转换函数
    b.outPut();
    A c = A(8);
    c.outPut();
    return 0;
}